Effectively fetch media content for enhancing media streaming

ABSTRACT

An online system more efficiently streams multimedia content over the Internet for play back on client devices with varying computing power and network bandwidths by generating enhanced manifest files that more efficiently identify suitable media representations of the multimedia content. Each media representation has multiple media segments according to predefined byte ranges and a manifest file, which identifies location of the media file, bitrates, resolution, byte range, total duration, and other metadata. The online system customizes a manifest file for a user based on various factors including device capacity, network connectivity type and geolocation of the user. The online system also generates manifest fetch commands, which more efficiently fetch media segments for streaming. In response to changes of streaming server and media file (e.g., increased popularity), the online system dynamically updates corresponding manifest files.

BACKGROUND

This disclosure generally relates to online digital content streaming,and particularly to an adaptive streaming system that generates enhancedmedia manifest files for identifying and streaming a live or on-demandmedia file (e.g., a video file) representations with various videoqualities to clients having varying delivery bandwidth and computingprocessing power.

An online system allows its users to connect to and communicate withother online system users. For example, an online system allows a userto encode media files, such as images or videos, and share the mediafiles with other online system users. An online system user may alsorequest to view media files (e.g., stream a video on demand) encoded bythe online system user, or by other online system users, encouraginguser engagement with the online system. However, this user engagement isdecreased with increased platform latency as online system users attemptto stream a media file outside of available bandwidth or view a popularmedia file.

To enable adaptive streaming of multimedia content over HTTP, when aninput media file (e.g., a video) is encoded, multiple levels ofcompression can be applied to the input file producing a plurality ofcompressed versions (e.g., resolution of 360p, 480p, 720p, 1080p, etc.),or “representations,” of the input file for streaming on a clientdevice. This allows an online system user to select the representationof a media file for streaming that is within the online system user'savailable bandwidth. However, if the online system user attempts tostream a media file at a representation that requires greater bandwidththan a client device or network connection will allow, the online systemuser experiences platform latency.

Existing solutions of adaptive streaming over HTPP divide a media fileinto segments according to a fixed duration (e.g., 10 second segments)and cache links to these segments (e.g., universal resource locators(URLs)) across computer servers within a given content delivery network(CDN). Each URL containing a segment of the media file is listed on themanifest file of its corresponding media file, in addition to thesegment's start points and end points. This allows an online system userto dynamically switch between representations to accommodate availablebandwidth. However, creating a manifest file entry for each segment of amedia file causes its manifest file to increase in size. Increasedmanifest file size complicates file administration and decreasesmanifest file storage efficiency for streaming service, especially livevideo streaming. In addition, larger manifest files increase platformlatency as the manifest file must be downloaded to a client devicebefore the media file may be streamed by an online system user.

The latency for fetching the proper media file and/or segments can becompounded by network congestion due to user traffic directed to popularmedia within a CDN. When a computer server within a CDN has a popular(e.g., trending) media, it is very likely that a large number of userrequests for the popular media will be directed to the computer server.This can cause a delay in the delivery of various representations of arequested media file and delay stream traffic.

Furthermore, for existing solutions, the delay in stream traffic is due,in part, to the initialization process that a streaming system mustcomplete before a client device can commence streaming a media file,such as properly initializing a manifest file associated with arepresentation of a media file. For example, a manifest file associatedwith a representation of a media file generally contains informationdescribing an initialization segment (init), which contains data thatdoes not change between segments, a segment index (sidx), whichdescribes byte ranges within a segment, and media segment information.However, using (init+sidx) format in a manifest file to guide a clientdevice on the amount of data to fetch from a storage device isinefficient as it requires the client device to perform a series offetches in order to locate the first segment of the media file.

SUMMARY

A solution is provided to more efficiently stream multimedia contentover the Internet for playback on client devices having varyingcomputing power and network bandwidth by generating enhanced manifestfiles that identify suitable media representations of the multimediacontent. A streaming system can produce multiple instances of a live oron-demand media file (e.g., a video file) with various video qualitiesand provide them to client devices having varying delivery bandwidth andCPU processing power. For example, responsive to an input file beinguploaded to the streaming system, a decision engine of the systemproduces multiple representations of the input file: low-definition (LD)representation, medium-definition (MD) representation, high-definition(HD) representation, and any other suitable representations of varyingqualities. Different representations of the same content encoded indifferent qualities enable a client device to request the highestquality content that it can play without waiting to buffer and withoutwasting bandwidth on unneeded pixels (e.g., a 4K content for a 720p TV).Each representation of the input file has a media presentationdescription (MPD) file, referred to herein as “manifest file,” whichidentifies various components of the representation of the media filesuch as location of the representation of the media file, bitrates,resolution, byte range, total duration, and the like. For simplicity,the solution for enhancing dynamic adaptive streaming over HTTP serviceis described with respect to dynamic adaptive streaming over HTTP (DASH)protocol. However, the solution can also be applied to other adaptivestreaming protocols, such as HTTP Living Streaming (HLS) protocol andSmooth Streaming protocol.

The manifest file for a representation of a media file contains thelocation of the representation of the media file, as well as informationused by the media player on a client device to locate the first segmentof the representation of the media file (e.g., video and/or audio). Eachrepresentation of a media file contains information describing how tofetch media segments according to its corresponding manifest file.Rather than performing multiple fetches to locate the start of arepresentation of a media file and its first segment via the start/endparameters defining the start and first segment, the streaming systemmay simplify the fetch command by determining the number of bytes ofdata to be fetched and identifiers of each fetch, e.g., a first datafetch, a second data fetch. The streaming system provides the fetchcommands and a corresponding manifest file associated with eachrepresentation of the media file to a media player on a client device tocommence streaming. This may reduce platform latency by more efficientlydefining the amount of data the client media player is to fetch in onedata fetch rather than performing a plurality of fetches beforestreaming can begin.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram of a system environment for providing enhanceddynamic adaptive streaming over HTTP (DASH) service according to oneembodiment.

FIG. 2 is a block diagram of an online system having a streaming systemfor providing DASH service according to one embodiment.

FIG. 3A shows a streaming system according to one embodiment.

FIG. 3B shows a streaming system according to another embodiment.

FIG. 4A illustrates a segmentation module according to one embodiment.

FIG. 4B shows an example of segments of different representations of amedia file according to one embodiment.

FIG. 5 is a block diagram of a DASH software module according to oneembodiment.

FIG. 6 is an interaction chart illustrating the interactions between aDASH software module on a client device and a streaming system accordingto one embodiment.

FIG. 7 shows an example of changes in video playback quality amongmultiple segments of a video according to one embodiment.

FIG. 8A is a flowchart illustrating a process for providing customizedmanifest files for a steaming video to a client device according to oneembodiment.

FIG. 8B is a flowchart illustrating a process for providing updatedmanifest files of a streaming video to a client device according to oneembodiment.

The figures depict embodiments of the present invention for purposes ofillustration only. One skilled in the art will readily recognize fromthe following discussion that alternative embodiments of the structuresand methods illustrated herein may be employed without departing fromthe principles of the invention described herein.

DETAILED DESCRIPTION I. System Overview

FIG. 1 is a block diagram of a system environment for providing multipleinstances of a live or on-demand media file (e.g., a video file) toclients having varying delivery bandwidth and CPU processing poweraccording to one embodiment. The system environment includes an onlinesystem 100, a client device 120, and a content provider system 160connected to each other over a network 140. In other embodiments,different and/or additional entities can be included in the systemarchitecture.

The client device 120 is a computing device capable of receiving userinput as well as transmitting and/or receiving data via the network 140.In one embodiment, a client device 120 is a conventional computersystem, such as a desktop or laptop computer. Alternatively, a clientdevice 120 may be a device having computer functionality, such as apersonal digital assistant (PDA), a mobile telephone, a smartphone oranother suitable device. A client device 120 is configured tocommunicate via the network 140. In one embodiment, a client device 120executes an application allowing a user of the client device 120 tointeract with the online system 100. For example, a client device 120executes a browser application to enable interaction between the clientdevice 120 and the online system 100 via the network 140. In anotherembodiment, a client device 120 interacts with the online system 100through an application programming interface (API) running on a nativeoperating system of the client device 120, such as IOS® or ANDROID™. Inthe embodiment shown in FIG. 1, the client device 120 has a DASHsoftware module 130 that can send video content requests to a streamingsystem 110, download/playback requested video content, monitor downloadbitrate of requested video content, and report download bitrate to thestreaming system 110 (further discussed in Section IV: DASH SoftwareModule).

The content provider system 160 is used by content providers forinteracting with the online system 100. In one embodiment, a contentprovider system 160 is an application provider communicating informationdescribing applications for execution by a client device 120 orcommunicating data to client devices 120 for use by an applicationexecuting on the client device 120. In other embodiments, a contentprovider system 160 provides content, e.g., streaming media, or otherinformation for presentation via a client device 120. For example, thecontent provider system 160 provides a third party website thatcommunicates information to the online system 100, such as sponsoredcontent or information about an application provided by the contentprovider. The sponsored content may be created by the entity that ownsthe content provider system 160. Such an entity may be a company (e.g.,a third party outside of the online system 100) offering a product,service, or message that the company wishes to promote.

The online system 100 includes a computing environment that allows usersof the online system 100 to communicate or otherwise interact with eachother and access content. The online system 100 stores information aboutthe users, for example, user profile information and information aboutactions performed by users on the online system 100. In one embodiment,the online system 100 includes a streaming system 110. The streamingsystem 110 (further described with reference to FIG. 2 in Section II.Streaming System) provides the DASH software module 120 with enhancedmanifest files that efficiently identify alternative media streams andtheir respective URLs.

The network 140 includes any combination of local area and/or wide areanetworks, using both wired and/or wireless communication systems. In oneembodiment, the network 140 uses standard communications technologiesand/or protocols. For example, the network 140 includes communicationlinks using technologies such as Ethernet, 802.11, worldwideinteroperability for microwave access (WiMAX), 3G, 4G, code divisionmultiple access (CDMA), digital subscriber line (DSL), etc. Examples ofnetworking protocols used for communicating via the network 180 includemultiprotocol label switching (MPLS), transmission controlprotocol/Internet protocol (TCP/IP), hypertext transport protocol(HTTP), simple mail transfer protocol (SMTP), and file transfer protocol(FTP). Data exchanged over the network 140 may be represented using anysuitable format, such as hypertext markup language (HTML) or extensiblemarkup language (XML). In some embodiments, all or some of thecommunication links of the network 140 may be encrypted using anysuitable technique or techniques.

In one embodiment, the network 140 contains a content delivery network(CDN) 150. CDN 150 is a scalable system of distributed computer servers,such as edge servers, ES 150A through ES 150N, that delivers content toa target user based on: the geographic location of the target user, theorigin of the requested content, and the traffic load placed onindividual edge servers within the CDN 150. In one embodiment, the CDN150 receives content from a source (e.g., content provider system 160),encodes a plurality of representations of the content at differentlevels of compression and file sizes, and stores representations acrossits network of edge servers. The streaming system 110, such as thatshown in FIG. 3B, creates manifest files for each representation of thedistributed media file to be used by a media player on a client device120 for streaming. In another embodiment, shown in FIG. 3A, thestreaming system 110 receives an input file 300, encodes the input file300, segments the encoded input file into multiple segments, creates amanifest file to describe attributes of a media representation of themedia file, and stores representations of the input file 300 across edgeservers comprising the CDN 150.

II. Online System

FIG. 2 is a block diagram of an online system 100 with a streamingsystem 110 according to one embodiment. In the embodiment illustrated inFIG. 2, the online system 100 includes a user profile store 200, actionlogger 210, action log 215, machine learning module 220, training datastore 225, and a streaming system 110. In other embodiments, the onlinesystem 100 may include additional, fewer, or different components forvarious applications. Conventional components such as networkinterfaces, security functions, load balancers, failover servers,management and network operations consoles, and the like are not shownso as to not obscure the details of the system architecture.

Each user of the online system 100 is associated with a user profile,which is stored in the user profile store 200. A user profile includesdeclarative information about the user that was explicitly shared by theuser and may also include profile information inferred by the onlinesystem 100. In one embodiment, a user profile store 200 of an onlinesystem user includes multiple data fields, each describing one or moreattributes of the user. Examples of information stored in a user profilestore 200 include biographic, demographic, and other types ofdescriptive information, such as work experience, educational history,gender, hobbies or preferences, location and the like. A user profilemay also store other information provided by the user, for example,images or videos. In certain embodiments, an image of a user may betagged with information identifying the online system user displayed inan image. A user profile in the user profile store 200 may also maintainreferences to actions by the corresponding user performed on contentitems in the action log 215.

While user profiles in the user profile store 200 are frequentlyassociated with individuals, allowing individuals to interact with eachother via the online system 100, user profiles may also be stored forentities such as businesses or organizations. This allows an entity toestablish a presence on the online system 100 for connecting andexchanging content with other online system 100 users. The entity maypost information about itself, about its products or provide otherinformation to users of the online system 100 using a brand pageassociated with the entity's user profile. Other users of the onlinesystem 100 may connect to the brand page to receive information postedto the brand page or to receive information from the brand page. A userprofile associated with the brand page may include information about theentity itself, providing users with background or informational dataabout the entity.

The action logger 210 receives communications about user actionsinternal to and/or external to the online system 100, populating theaction log 215 with information about user actions. Examples of actionsinclude adding a connection to another user, sending a message toanother user, uploading an image, reading a message from another user,viewing content associated with another user, and attending an eventposted by another user. In addition, a number of actions may involve anobject and one or more particular users, so these actions are associatedwith those users as well and stored in the action log 215.

The action log 215 may be used by the online system 100 to track useractions on the online system 100, as well as actions on third partysystems that communicate information to the online system 100. Users mayinteract with various objects on the online system 100, and informationdescribing these interactions is stored in the action log 215. Examplesof interactions with objects include: viewing videos, commenting onposts, sharing links, checking-in to physical locations via a mobiledevice, accessing content items, and any other suitable interactions.Additional examples of interactions with objects on the online system100 that are included in the action log 215 include: viewing videosposted by a user's connections in the online system 100, commenting on aphoto album, communicating with a user, establishing a connection withan object, joining an event, joining a group, creating an event,authorizing an application, using an application, expressing apreference for an object (“liking” the object), and engaging in atransaction. Additionally, the action log 215 may record a user'sinteractions with sponsored content on the online system 100 as well aswith other applications operating on the online system 100. In someembodiments, data from the action log 215 is used to infer interests orpreferences of a user, augmenting the interests included in the user'suser profile store 200 and allowing a more complete understanding ofuser preferences.

The action log 215 may also store user actions taken on a third partysystem, such as an external website, and communicated to the onlinesystem 100. For example, an e-commerce website may recognize a user ofan online system 100 through a social plug-in enabling the e-commercewebsite to identify the user of the online system 100. Because users ofthe online system 100 are uniquely identifiable, e-commerce websites,such as in the preceding example, may communicate information about auser's actions outside of the online system 100 to the online system 100for association with the user. Hence, the action log 215 may recordinformation about actions users perform on a third party system,including webpage viewing histories, sponsored content that wereengaged, purchases made, and other patterns from shopping and buying.

The machine learning module 220 trains one or more machine learningmodels for the streaming system 110 using training data from thetraining data store 225, where the streaming system 110 uses a trainedmodel to select a suitable media representation of a media file for atarget user based on various features associated with the target user.For example, the machine learning module 220 uses one or more machinelearning algorithms such as neural networks, naïve Bayes, and supportvector machines with training data from the training data store 225 totrain the models. To train a model for the streaming system, the machinelearning module 220 extracts information about users in the trainingdata set from each user's action log 215 and user profile store 200.This information is stored in the training data store 225 and is used todevelop a machine learning model that provides a target user withcustomized streaming features for requested media files at runtime. Forexample, to customize playback options for a requested media file for atarget user, the streaming system 110 provides the target user with“best” streaming settings predicted by a trained model based on theuser's viewing history and geolocation.

III. Streaming System

FIG. 3A is a block diagram of a streaming system 110 according to oneembodiment. In the embodiment illustrated in FIG. 3A, the streamingsystem 110 is a media streaming system that includes an encoder module305, segmentation module 310, manifest generator 315, manifest fetchmodule 320, CDN link update module 325, decision engine 330, input filestore 335, encoded file store 340, and manifest file store 345. In thisembodiment, the streaming system 110 encodes input files 300 supplied byone or more content providers, such as online system 100 users,generates manifest files associated with each input file 300, providesthe generated manifest files including instructions to the CDN 150 onhow to efficiently fetch instructions in each manifest file, and updatesmanifest files based on load balancing among computer servers within theCDN 150.

The encoder module 305 encodes the input file 300 into one or morecompressed representations: low-definition (LD), medium-definition (MD),high-definition (HD), and any other suitable representations of varyingqualities. A LD representation of the input file 300 represents a lowquality version of the input file 300; a MD representation of the inputfile 300 represents a medium quality version of the input file 300; andHD representation of the input file 300 represents a high qualityversion of the input file 300. The quality of the input file 300 can bedescribed by various standards, such as bitrate, frame rate, peak signalto noise ratio (PSNR), and resolution. Different representations of samecontent encoded in different qualities enable client devices to requestthe highest quality content that they can play without waiting to bufferand without wasting bandwidth on unneeded pixels (e.g., a 4K content fora 720p TV). These representations of the input file 300 are stored inthe encoded file store 340; the original input file 300 is stored in theinput file store 335. In one embodiment, the encoder module 305indiscriminately encodes all representations (e.g., LD, MD, and HD) foreach input file 300, regardless of its source or computing power orbandwidth of receiving client devices. In response to a request forstreaming the input file 300, a decision is made by the decision engine330 on which representation of the input file 300 is used for thestreaming. In another embodiment, the encoder module 305 first generatesan LD representation of the input file 300 by default such that everyinput file 300 will have, at least, an LD representation. Additionalrepresentations of the input file 300 (e.g., MD and HD) are made basedon information (e.g., reputation of the source of the content,popularity of the input file 300, geolocation of the requesting clientdevice) collected by the decision engine 330.

The segmentation module 310 divides a representation of the input file300 into multiple small sized media segments. Each segment of arepresentation of the input file 300 has multiple video frames (andaudio frames) of the input file 300, and each segment corresponds to aportion of the input file 300. In one embodiment, the segmentationmodule 310 divides a representation of the input file 300 by a fix-sizedbyte range, e.g., 100 KB per segment, and describes the segments of therepresentation as byte ranges within a single media file. FIG. 4A showsa media file that represents a representation of an input file ispartitioned into a plurality of media segments 405A-405N. Byte-rangeoffset 400 is an adjustable threshold used to describe the media file assegments of a fixed file size (e.g. 100 KB per segment). By describingsegments of a representation of a media file in terms of byte rangerather than describing each separate segment in terms of othersegmenting standards, such as duration of each segment (e.g., 405A-405Nshown in FIG. 4A), the segmentation module 310 reduces the number of URLentries in the manifest file describing the segments of therepresentation.

FIG. 4B illustrates an example of segmentation of corresponding HD 415,MD 420, and LD 425 media files of an input file. Although the file sizeof each representation is different as a result of compression, thebyte-range offset 400 used to describe each segment of eachrepresentation is same, e.g., 100K bytes per segment. For example,although the HD 415 representation of the input file 300 is larger thanthe MD 420 representation, media segment 415A and media segment 420A arethe same size (e.g., 100 KB). This allows the streaming system 110 tostream seamlessly across a plurality of representations of a requestedmedia file.

Referring back to FIG. 3A, the manifest generator 315 generates amanifest file for each media file in the online system 100 for streamingto a target audience. In one embodiment, the manifest file for a mediafile, e.g., the input file 300, includes information describing thelocation of the input file 300, e.g., a URL identifying the location atan edge server in a CDN for downloading the input file 300 by a clientdevice. If a media file is encoded into multiple representations, e.g.,LD, MD and HD, the manifest file for the media file can includeadditional information, e.g., identifier and location of eachrepresentation, bitrate, resolution, byte-range of segments, and totalduration. In another embodiment, each representation of the media filehas a corresponding manifest file, which includes informationidentifying the quality of the representation, URL of the base file(i.e., the URL of the media file), byte range of segments, number ofsegments, etc. Manifest files are stored in the manifest file store 345,and are used to locate and stream media files. In another embodiment, ifa media file is encoded into multiple representations, e.g., LD, MD andHD, the manifest generator 315 generates manifest files for allrepresentations of each input file 300. For an example of thisembodiment, each representation of the media file has a correspondingmanifest file, which includes information identifying the quality of therepresentation, URL of the base file (i.e., the URL of the media file),byte range of segments, number of segments, etc.

To enhance user experience with the streaming service provided by theonline system 100, the manifest file can be customized for a targetuser, e.g., selecting a suitable media representation of a video forstreaming to the target user such that the target user gets the bestquality video quality given the target user's geolocation, networkbandwidth and computing power of a client device used by the target userto download the video. In one embodiment, decision engine 330 uses amodel trained by the machine learning module 220 to determine at whichquality the media file will stream for the target user. When the targetuser requests the streaming system 110 to stream a media file, thedecision engine 330 uses the trained model to collect data about thetarget user including: client device 120 (e.g., player capacity),network connectivity type (e.g., cell/Wi-Fi/2G) and geolocation of thetarget user. The decision engine 330 selects a representation of therequested video such that the target user will most likely use to havebest quality stream service using the selected representation of therequested video. All users of the streaming system 110 have at least, anLD representation of the original input file 300 by default to beginstreaming, but users can dynamically switch to other representationsbased on network conditions and client device 120 bandwidth associatedwith each user. This allows users to request the highest representationquality available for playback without waiting to buffer and withoutwasting bandwidth on unneeded pixels (e.g., 1080p content not needed on720p device).

In one embodiment, the decision engine 330 extracts a target user's IPaddress (e.g., from the action log 215) and the representation qualityat which a requested media file is streaming (e.g., LD, MD, or HD). Thetarget user's geolocation data is derived from the IP address and isused in tandem with representation quality information as input to thetrained model to predict the most likely representation quality to beused in a given region where the target user is located. The manifestgenerator 315 uses this quality prediction model to customize a manifestfile that includes only those streaming options available to a userwithin that region. For example, an online system 100 user located inSouth Korea will be presented with a plurality of representation optionsfor streaming (e.g., LD, MD, and HD) due to the high bandwidth availablein the region. Conversely, a user in a particular region of India mightbe presented with only default (e.g., LD) representation quality due tothe region's poor bandwidth. In another embodiment, the decision engine330 uses the trained model to extract a target user's identificationinformation (e.g., from the user profile store 200) and representationquality to select a suitable representation of requested video based onindividual users of the online system 100. For example, if a target userfrequently streams media files at MD representation quality due todevice capabilities, the decision engine 330 uses the trained model toassociates the target user with MD streaming quality. Based on thisassociation, the manifest generator 315 creates a manifest file for thetarget user that prioritizes MD representation quality.

The CDN link update module 325 proactively selects one or more edgeserver(s) (e.g., ES 150A through ES 150N) to cache a requested mediafile in the event that the media file becomes popular within the onlinesystem 100 or if an edge server within the CDN malfunctions (e.g.,slower response to streaming requests due to large increase of workload). The streaming system 110 considers various factors in determiningto which edge server within CDN 150 a streaming request should beredirected and updates the manifest file corresponding to the request toreflect the redirection, including: locality of the edge server to auser requesting the media file, loads placed upon each edge server, andthe storage capacity of each edge server. In one embodiment, the CDNlink update module 325 constantly monitors the status of the CDN, suchas traffic load of each edge server, number requests for each media filestored in an edge server, and periodically generated as CDN data. Inresponse to a threshold number of updates being observed from the CDNdata, e.g., a large number of requests for a popular video stored in aparticular edge server, the CDN link update module 325 locates one ormore alternate edge servers to host representations of the popular mediafile. In order to perform load balancing across edge servers, the CDNconsiders the proximity of an edge server to an online system user thatrequested the popular media file (e.g., locality) and load placed oneach edge server (e.g., busyness) within the CDN. When a selection ismade, the CDN link update module 325 caches representations of thepopular media file in the selected edge server(s) and instructs themanifest generator 315 to updates the manifest file associated with eachrepresentation to reflect its new location (e.g., URL).

The manifest fetch module 320 generates commands on how to fetchsegments of a representation of a media file through the correspondingmanifest files for requested media file. As described above, arepresentation of a media file includes multiple segments, each of whichis located within the representation of the media file in terms of byterange with respect to a first segment. Traditional fetch commands oftenrequire multiple fetches for a requested segment, e.g., one fetch forinitialization defined by a pair of start/end parameters and anotherfetch for the requested segment defined by another pair of start/endparameters, and have to record the index for the initiation (i.e., init)and segmentation index (i.e., sidx) for each segment in the manifestfile. The enhanced manifest file for a representation generated by theonline system 100 enables the segment fetch with improved efficiency.For example, each fetch command is simplified to indicate the number ofthe fetch, e.g. a first-data-fetch, a second-data-fetch, and byte sizeof each fetch, which is one or more fix-sized byte ranges (e.g., 100Kbytes, 200K bytes). In addition, the manifest fetch module 320dynamically maintains record of which media segment is currently beingdownloaded and which is next to stream by tracking the number of bytesthat are currently being fetched.

When a target user requests to stream a media file, the manifest fetchmodule 320 first locates the manifest files associated with therequested media file and provides the LD version to a media player inthe DASH software module 130 installed on the target user's clientdevice 120. This LD version is provided to the target user by default tominimize latency due to buffering as a media download module on theclient device downloads the first media segment of the requested mediafile to the client device 120. In addition to supplying the media playerwith manifest files, the manifest fetch module 320 keeps record of whichmedia segment is currently being downloaded by the media downloadmodule, which media segment will be required next, and at whatrepresentation it will be streamed. The manifest fetch module 320receives a signal from the decision engine 330 indicating therepresentation quality (e.g., LD, MD, or HD) that the target user iscapable of streaming, and dynamically switches to the suitablerepresentation of the requested video according to the received signal.

IV. Dash Software Module

FIG. 5 is a block diagram of the DASH software module 130 executing on aclient device 120 according to one embodiment. In the embodimentillustrated in FIG. 5, the DASH software module 130 includes a clientinterface module 500, a client monitoring module 510, a media downloadmodule 520, and a media player 530. The DASH software module 130provides the streaming system 110 with information regarding clientdevice 120 bandwidth (e.g., 5 Mb/s); the streaming system 110 providesthe DASH software module 130 with a manifest file used to stream mediawithin the reported bandwidth (e.g., HD quality).

The client interface module 500 receives input from the streaming system110 and provides the received input to the DASH software module 130 forfurther processing. Online system 100 users use the client interfacemodule 500 to make a media file request that is provided to the decisionengine 330 in the steaming system 110 for further processing.

The client monitoring module 510 monitors bandwidth capabilities on theclient device 120, and reports these bandwidth capabilities to thedecision engine 330. The decision engine 330 uses this information todiscern the appropriate manifest file (e.g., manifest file for LD, MD,or HD representations) to stream a requested media file within thereported client device 120 bandwidth. By reporting changes in a targetuser's bandwidth, the streaming system 110 provides the higheststreaming quality available to the target user for each segment of arequested media file. This is described in more detail in an example usecase in Section V: Streaming Process.

The media download module 520 downloads media files for streaming on aclient device 120. The manifest fetch module 320 provides the mediadownload module 520 with a manifest file corresponding to a requestedmedia file for streaming within the client device 120 bandwidth. In oneembodiment, the manifest file directs the media download module 520 tothe location of a requested media file within the encoded file store340, shown in FIG. 3A. In another embodiment, the manifest file pointsto edge server URLs (e.g., ES 150A through ES 150N) within the CDN 150that contain the requested media file. In both of these embodiments, themedia download module 520 locates and downloads each byte-range segmentof a requested media file.

The media player 530 plays back requested media files on a client device120. Once the appropriate byte range of a media file has been locatedand downloaded by the media download module 520, the downloaded mediafile is streamed on the media player 530. The media player 530 maycontain a user interface that allows an online system 100 user tomanually select at which representation the online system 100 user wouldlike to stream. However, if this selection is for a representation thatexceeds the bandwidth capabilities of the online system 100 user'sclient device 120, platform latency will cause the media player 530 tobuffer as the media download module 520 downloads the next byte range ofthe media file.

v. Streaming Process

FIG. 6 illustrates the interaction between the DASH software module 130of a client device 120 and the streaming system 110 in one embodiment.In this embodiment, the DASH software module 130 on a target user'sclient device 120 sends to the streaming system 110 a request 600 tostream a media file (e.g., video). The streaming system 110 receivesthis request and obtains 605 manifest files for LD, MD, and HDrepresentations of the requested video from the manifest file store 345.The streaming system then provides 610 the DASH software module 130 withthe manifest file pertaining to LD representation quality by default.The media download module 520 uses this manifest file to download 615the requested video; the client monitoring module 510 monitors 620 thedownload bitrate while the download is in progress. The clientmonitoring module 510 reports 625 this download bitrate, via the clientinterface module 500, to the streaming system 110 where it is receivedby the decision engine 330. The decision engine 330 uses downloadbitrate information and a trained quality prediction model to determine635 which manifest file will be used for the next segment of therequested video while the media player 530 begins playback 630 of thecurrent segment. If the target user's bandwidth is capable of streamingthe representation quality suggested by the quality prediction model,and the target user has not requested a higher quality from the mediaplayer 530, the decision engine 330 sends a signal to the manifest fetchmodule 320 indicating which manifest file to retrieve from the manifestfile store 345. The manifest fetch module 320 then provides 640 thisupdated manifest file to the DASH software module 130 where it is usedto download 615 the next segment of the requested video; this processrepeats until the requested video has ended or there is a change (e.g.,congestion) in network conditions. The streaming system 110 monitors 645individual loads placed on edge servers, ES 150A through ES 150N, withinthe CDN 150. If it detects an increasing load placed on any particularedge servers (e.g., due to user traffic, server capacity, CDNmalfunction, and the like) it signals the CDN link update module 325 toinitiate load balancing amongst edge servers. The CDN link update module325 selects the next edge server to host the requested video, andreports the server's URL to the manifest generator 315 where thecorresponding manifest file is revised 650 to reflect the video's newlocation. The manifest fetch module 320 provides 655 the modifiedmanifest file to the media download module 520 where it is used todownload 615 the requested video and the overall process repeats untilthe conclusion of the video. This streaming process is furtherillustrated in FIG. 8B.

FIG. 7 illustrates an example use case in which a target user requeststo stream a video on coverage of the 2016 Presidential Debate. Thestreaming system 110 begins streaming segment 1 at LD 425 playbackquality 700 by default between times T₀ and T₁ from host ES 150A. Thedecision engine 330 identifies the target user, and uses the trained thequality prediction model to make a recommendation for HD 415 playbackquality 700. However, the client monitoring module 510 reports thetarget user's bandwidth to be only 400 Kb/s. The decision engine 330determines that, although the target user frequently streams requestedmedia files in HD 415, this reported bandwidth is too low to support therecommendation made by the quality prediction model. Rather, thedecision engine 330 supplies the DASH software module 130 with amanifest file for MD 420 streaming from ES 150B, where the MD 420representation is hosted. This is illustrated in FIG. 7 as the playbackquality 700 changes from LD 425 to MD 420 at time T₁. Segment 2 streamsat MD 420 until time T₂, when ES 150B experiences congestion due tovideo popularity. The client monitoring module 510 reports that thetarget user's bandwidth has dropped to 300 Kb/s; the manifest fetchmodule 320 supplies the DASH software module 130 with the manifest filefor the LD 425 representation on ES 150A once again. This is shown inFIG. 7 as the playback quality 700 drops from MD 420 to LD 425 at timeT₂. Between times T₂ and T₃ (i.e. while segment 3 is streaming), thedecision engine signals the CDN link update module 325 to locate analternate edge server to host the debate coverage and balance the loadacross CDN 150. The CDN link update module 325 determines that ES 150Cis closest in proximity to the target user, and contains adequatecapacity to host the MD 420 representation of the popular video. Thevideo is cached in ES 150C and the manifest generator 315 includes theedge server's URL in the manifest file corresponding to the MD 420representation of the debate. The client monitoring module reports thatthe target user's bandwidth is again at 400 Kb/s, so the streamingsystem 110 provides the DASH software module 130 with the modified MD420 manifest file. This is shown in FIG. 7 as playback quality 700resumes MD 420 representation at time T₃ to stream segment 4 from hostES 150C. At time T₄, the target user's bandwidth increases to 5 Mb/s.Because the quality prediction model associated with the target userrecommends HD 415 playback quality 700, and the client monitoring module510 reports that target user bandwidth can now accommodate thisrecommendation, the decision engine 330 signals the manifest fetchmodule 320 to retrieve the manifest file corresponding to the HDrepresentation of the debate. This is illustrated in FIG. 7 as thetarget user streams segment 5 in HD 415 playback quality 700 from timeT₄ to T₅.

FIG. 8A is a flowchart illustrating a process for generating manifestfiles for each representation of an input media file for streaming. Thestreaming system 110 receives 800 an input file 300 from a contentprovider, e.g., an online system 100 user, premium broadcaster, contentprovider, etc., and encodes 805 the input file 300 in one or more mediarepresentations, including at least an LD compressed representation. Thestreaming system 110 then determines 810 whether to encode additionalmedia representations, e.g., by examining the source of the input file300. If the source is from premium broadcasters or well-established(e.g. popular) online system 100 users, the encoder module 305 generates815 additional representations (e.g., MD and HD) of the input file 300.The streaming system 110 segments 820 each media representation intomultiple media segments according a predetermined byte-range offset,e.g., 100 KB per segment, and generates 825 a least one manifest fetchfor each representation. The streaming system 110 further generates 830manifest file fetch commands for each representation, and stores 835 therepresentations of the input file 300, manifest files and manifest fetchcommands in the streaming system 110 or cached across edge servers (ES150A through ES 150N) within the CDN 150.

FIG. 8B is a flowchart illustrating a process for providing an onlinesystem 100 user the appropriate representation of a media file forstreaming based on characteristics associated with the target user andhis/her client device. The streaming system 110 receives 840 a requestto stream media content of a media file from a target user and provides845 the online system 100 user with a manifest file for the LDrepresentation of the media file by default, where the target userdownloads the LD representation media file according to thecorresponding manifest file. The DASH software module 130 on the targetuser's client device uses this manifest file to begin downloading therequested media. As the media file downloads and begins streaming on theonline system 100 user's client device 120, the streaming system 110receives 850 download information, e.g., download bitrate, and networkbandwidth, from the client device 120. The streaming system 110 uses atrained quality prediction model to determine 855 which representationof the requested media file the online system 100 user is most suitablefor the target user to stream. The streaming system 110 then determines860 if the online system 100 user's bandwidth in capable of supporting arepresentation recommended by the trained quality prediction model. Ifthe bandwidth is sufficient for streaming a representation in line withthe quality prediction model recommendation, a manifest file pertainingto the recommended representation is provided 865 to the DASH softwaremodule 130 for streaming. However, if bandwidth is insufficient forstreaming the recommended representation, the streaming system 110provides 865 the DASH software module with the appropriate manifest filefor streaming within the given bandwidth. In addition, the streamingsystem 110 monitors 870 the capacities of each edge server within theCDN 150. In the event that a media file within the CDN 150 becomespopular, or if an edge server malfunctions, the streaming system 110updates 875 the manifest file associated with the requested media fileif a change in edge servers is needed. The streaming system 110 thenprovides 880 the updated manifest file to the DASH software module 130so that streaming may continue.

VI. General

The foregoing description of the embodiments of the invention has beenpresented for the purpose of illustration; it is not intended to beexhaustive or to limit the invention to the precise forms disclosed.Persons skilled in the relevant art can appreciate that manymodifications and variations are possible in light of the abovedisclosure.

Some portions of this description describe the embodiments of theinvention in terms of algorithms and symbolic representations ofoperations on information. These algorithmic descriptions andrepresentations are commonly used by those skilled in the dataprocessing arts to convey the substance of their work effectively toothers skilled in the art. These operations, while describedfunctionally, computationally, or logically, are understood to beimplemented by computer programs or equivalent electrical circuits,microcode, or the like. Furthermore, it has also proven convenient attimes, to refer to these arrangements of operations as modules, withoutloss of generality. The described operations and their associatedmodules may be embodied in software, firmware, hardware, or anycombinations thereof.

Any of the steps, operations, or processes described herein may beperformed or implemented with one or more hardware or software modules,alone or in combination with other devices. In one embodiment, asoftware module is implemented with a computer program product includinga computer-readable non-transitory medium containing computer programcode, which can be executed by a computer processor for performing anyor all of the steps, operations, or processes described.

Embodiments of the invention may also relate to a product that isproduced by a computing process described herein. Such a product mayinclude information resulting from a computing process, where theinformation is stored on a non-transitory, tangible computer readablestorage medium and may include any embodiment of a computer programproduct or other data combination described herein.

Finally, the language used in the specification has been principallyselected for readability and instructional purposes, and it may not havebeen selected to delineate or circumscribe the inventive subject matter.It is therefore intended that the scope of the invention be limited notby this detailed description, but rather by any claims that issue on anapplication based hereon. Accordingly, the disclosure of the embodimentsof the invention is intended to be illustrative, but not limiting, ofthe scope of the invention, which is set forth in the following claims.

What is claimed is:
 1. A computer-implemented method, comprising:receiving from a user of an online system a request for streaming mediacontent of a media file; encoding the media file into one or more mediarepresentations of the media content, each of the one or more mediarepresentations of the media content describing a correspondingstreaming quality of the media content; segmenting each of the one ormore media representations of the media content into a plurality ofmedia segments according to a predefined byte offset; generating amanifest file for each of the one or more media representations of themedia content, each manifest file for a media representation of themedia content comprising information describing a location of the mediarepresentation of the media content, and a plurality of media segmentsfor the media representation of the media content; analyzing a pluralityof user features describing the user and conditions associated withstreaming the media content to the user, the plurality of user featuresincluding a history of streaming services received by the user, thehistory of streaming services identifying a quality of mediarepresentation preferred by the user; generating one or more fetchcommands for a media representation of the media content having thequality of media representation preferred by the user, each fetchcommand indicating a number of bytes of media content to be fetched withrespect to an initial byte offset; and providing the manifest file andthe corresponding one or more fetch commands to the user of the onlinesystem for streaming the media content of the media file.
 2. The methodof claim 1, wherein the location of the media representation of themedia content included in the manifest file for each of the one or moremedia representations of the media content includes a universal resourcelocator (URL) of the media content provided by a content provider. 3.The method of claim 1, wherein generating one or more fetch commands forthe media representation of the media content having the quality ofmedia representation preferred by the user comprises: determining theinitial byte offset associated with a first media segment within themedia representation having the quality of media representationpreferred by the user based on a byte range of the first media segment;wherein the number of bytes of media content to be fetched is a sum ofthe initial byte offset and a number of bytes associated with a numberof media segments to be fetched.
 4. The method of claim 1, wherein eachof the plurality of media segments for the media representation of themedia content included in the manifest file for each of the one or moremedia representations of the media content represents a portion of themedia content, wherein a size of each of the plurality of media segmentsis defined by a corresponding byte range within the media representationof the media content included in the manifest file for each of the oneor more media representations of the media content.
 5. The method ofclaim 4, wherein each of the plurality of media segments of the mediarepresentation of the media content has a same size measured by thecorresponding byte range within the media representation of the mediacontent included in the manifest file for each of the one or more mediarepresentations of the media content.
 6. The method of claim 1, furthercomprising: tracking a byte offset of a last media segment of the mediacontent in a current media representation of the media content.
 7. Themethod of claim 6, further comprising: receiving a request for adifferent media representation of the one or more media representationsof the media content from a media player of the user; and generating afetch command in response to the received request, the generated fetchcommand identifying the byte offset of the last media segment of themedia content in the current media representation of the media contentas the initial byte offset; and providing the generated fetch command tothe media player of the user to fetch media segments comprising thedifferent media representation of the one or more media representationsof the media content subsequent to the last media segment of the mediacontent in the current media representation.
 8. The method of claim 1,wherein the one or more media representations of the media content aresupported by dynamic adaptive streaming over HTTP (DASH) streamingprotocol.
 9. The method of claim 1, wherein generating the manifest filefor each of the one or more media representations of the media contentfurther comprises: receiving information from a media player of theuser, the information including, at least, a current bit rate forstreaming a current media representation of the media content by themedia player of the user.
 10. The method of claim 9, further comprising:determining a next media representation of the one or more mediarepresentations of the media content based on the received information;generating a manifest file for the determined next media representationof the one or more media representations of the media content; andgenerating one or more fetch commands associated with the manifest filefor the determined next media representation of the one or more mediarepresentations of the media content.
 11. A non-transitory computerreadable storage medium having instructions encoded thereon that, whenexecuted by a processor, cause the processor to perform the stepsincluding: receiving from a user of an online system a request forstreaming media content of a media file; encoding the media file intoone or more media representations of the media content, each of the oneor more media representations of the media content describing acorresponding streaming quality of the media content; segmenting each ofthe one or more media representations of the media content into aplurality of media segments according to a predefined byte offset;generating a manifest file for each of the one or more mediarepresentations of the media content, each manifest file for a mediarepresentation of the media content comprising information describinglocation of the media representation of the media content, and aplurality of media segments for the media representation of the mediacontent; analyzing a plurality of user features describing the user andconditions associated with streaming the media content to the user, theplurality of user features including a history of streaming servicesreceived by the user, the history of streaming services identifying aquality of media representation preferred by the user; generating one ormore fetch commands for a media representation of the media contenthaving the quality of media representation preferred by the user, eachfetch command indicating a number of bytes of media content to befetched with respect to an initial byte offset; and providing themanifest file and corresponding one or more fetch commands to the userof the online system for streaming the media content of the media file.12. The non-transitory computer readable storage medium of claim 11,wherein the location of the media representation of the media contentincluded in the manifest file for each of the one or more mediarepresentations of the media content includes a universal resourcelocator (URL) of the media content provided by a content provider. 13.The non-transitory computer readable storage medium of claim 11, whereingenerating one or more fetch commands for the media representation ofthe media content having the quality of media representation preferredby the user comprises: determining the initial byte offset associatedwith a first media segment within the media representation having thequality of media representation preferred by the user based on a byterange of the first media segment; wherein the number of bytes of mediacontent to be fetched is a sum of the initial byte offset and a numberof bytes associated with a number of media segments to be fetched. 14.The non-transitory computer readable storage medium of claim 11, whereineach of the plurality of media segments for the media representation ofthe media content included in the manifest file for each of the one ormore media representations of the media content represents a portion ofthe media content, wherein a size of each of the plurality of mediasegments is defined by a corresponding byte range within the mediarepresentation of the media content included in the manifest file foreach of the one or more media representations of the media content. 15.The non-transitory computer readable storage medium of claim 14, whereineach of the plurality media segments of the media representation of themedia content has a same size measured by the corresponding byte rangewithin the media representation of the media content included in themanifest file for each of the one or more media representations of themedia content.
 16. The non-transitory computer readable storage mediumof claim 11, further comprising instructions encoded thereon that, whenexecuted by a processor, cause the processor to perform the stepsincluding: tracking a byte offset of a last media segment of the mediacontent in a current media representation of the media content.
 17. Thenon-transitory computer readable storage medium of claim 16, furthercomprising instructions encoded thereon that, when executed by aprocessor, cause the processor to perform the steps including: receivinga request for a different media representation of the one or more mediarepresentations of the media content from a media player of the user;and generating a fetch command in response to the received request, thegenerated fetch command identifying the byte offset of the last mediasegment of the media content in the current media representation of themedia content as the initial byte offset; and providing the generatedfetch command to the media player of the user to fetch media segmentscomprising the different media representation of the one or more mediarepresentations of the media content subsequent to the last mediasegment of the media content in the current media representation. 18.The non-transitory computer readable storage medium of claim 11, whereinthe one or more media representations of the media content are supportedby dynamic adaptive streaming over HTTP (DASH) streaming protocol. 19.The non-transitory computer readable storage medium of claim 11, whereingenerating the manifest file for each of the one or more mediarepresentations of the media content further comprises: receivinginformation from a media player of the user, the information including,at least, a current bit rate for streaming a current mediarepresentation of the media content by the media player of the user. 20.The non-transitory computer readable storage medium of claim 19, furthercomprising instructions encoded thereon that, when executed by aprocessor, cause the processor to perform the steps including:determining a next media representation of the one or more mediarepresentations of the media content based on the received information;generating a manifest file for the determined next media representationof the one or more media representations of the media content; andgenerating one or more fetch commands associated with the manifest filefor the determined next media representation of the one or more mediarepresentations of the media content.